<template>
    <div class="main_box" style="padding:10px">
        <div class="add_wrap">
            <el-form label-width="200px">
                <div class="tit">
                    <h2>基础信息</h2>
                    <el-button type="success" plain size="small" icon="fa fa-mail-forward" @click="returnList">返回
                    </el-button>
                </div>
                <el-row>
                    <el-form-item label="配送费模板名称:">
                        <span>{{ dataInfo.modelName }}</span>
                    </el-form-item>
                    <el-form-item label="商户:">
                        <span>{{ dataInfo.businessName }}</span>
                    </el-form-item>
                    <el-form-item label="创建人:">
                        <span>{{ dataInfo.createUserName }}</span>
                    </el-form-item>
                    <el-form-item label="创建时间:">
                        <span>{{ dataInfo.createDate }}</span>
                    </el-form-item>
                    <el-form-item label="修改人:">
                        <span>{{ dataInfo.modifyUserName }}</span>
                    </el-form-item>
                    <el-form-item label="修改时间:">
                        <span>{{ dataInfo.modifyDate }}</span>
                    </el-form-item>
                </el-row>
                <div class="tit">
                    <h2>配送费表</h2>
                </div>
                <el-row style="width:max-content;max-width: 1400px;">
                    <el-table style="width:calc(100vw - 270px);max-width:fit-content;" :data="list" border highlight-current-row
                        :header-row-style="{ 'background-color': '#f2f2f2' }">
                        <el-table-column label="价格区间(元)" align="center" width="170">
                                <template slot-scope="scope">
                                    <div class="price-decimal">
                                        {{ scope.row.priceMin }}
                                        <div class="sperate"></div>
                                        {{ scope.row.priceMax }}
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column label="服务员实际所得-公共(元)" align="center" width="120" prop="pubWaiterRealDeliveryFee">

                            </el-table-column>
                            <el-table-column label="平台实际补贴(元)" align="center" width="120" prop="pubPlatformRealDeliveryFee">

                            </el-table-column>
                            <el-table-column label="用户应出(元)" align="center" width="120" prop="customerDeliveryFee">

                            </el-table-column>
                            <el-table-column label="平台补贴-公共(元)" align="center" width="120" prop="pubPlatformDeliveryFee">

                            </el-table-column>
                            <el-table-column label="商户补贴-公共(元)" align="center" width="120" prop="pubBusinessDeliveryFee">

                            </el-table-column>
                            <el-table-column label="服务员所得-公共(元)" align="center" width="120" prop="pubWaiterDeliveryFee">

                            </el-table-column>
                            <el-table-column label="用户应出最大值(元)" align="center" width="120" prop="maxCustomerDeliveryFee">

                            </el-table-column>



                            <el-table-column label="服务员实际所得-专属(元)" align="center" width="120" prop="priWaiterRealDeliveryFee">

                            </el-table-column>
                            <el-table-column label="平台实际补贴-专属(元)" align="center" width="120" prop="priPlatformRealDeliveryFee">

                            </el-table-column>
                            <el-table-column label="平台补贴-专属(元)" align="center" width="120" prop="priPlatformDeliveryFee">

                            </el-table-column>
                            <el-table-column label="商户补贴-专属(元)" align="center" width="120" prop="priBusinessDeliveryFee">

                            </el-table-column>
                            <el-table-column label="服务员所得-专属(元)" align="center" width="120" prop="priWaiterDeliveryFee">

                            </el-table-column>
                    </el-table>
                </el-row>
            </el-form>
        </div>
    </div>
</template>

<script>
import DeliveryModelApi from '@/api/business/deliveryModel';
export default {
    data() {
        return {
            dataInfo: {},
            list:[]
        };
    },
    computed: {
    },
    mounted() {
        this.getData()
    },
    methods: {
        getData() {
            DeliveryModelApi.getDeliveryModelInfo({ id: this.$route.query.id }).then(res => {
                this.dataInfo = res.data
                this.list = res.data.list
            })
        },
        returnList() {
            this.$store.dispatch('delView', this.$route);
            this.$router.push({ path: '/business/deliveryModelManagement' })
        }
    },

}

</script>
<style lang="scss" scoped>
@import "@/assets/css/views/add.scss";
</style>
<style lang="scss" scoped>
    .price-decimal {
    display: flex;
    justify-content: center;
    align-items: center;
    .sperate{
        width:12px;
        height: 1px;
        margin: 0 6px;
        background-color: rgb(112, 110, 110);
        // margin: 0 2px;
    }
}
</style>
